$files = Get-ChildItem $args[0]
foreach ($font in $files) 
{
$TheBaseName = $font.BaseName
$TheExtension = $font.Extension
$TheName = $font.Name
$TheDirName = $font.DirectoryName
$TheDirAndPath = $font.FullName

IF ( $font.Name -NotMatch "placeholder.remove" )
{

	IF ( -Not ([System.IO.File]::Exists("C:\Windows\Fonts\$TheName")))
	{
		Copy-Item -Force $TheDirAndPath "C:\Windows\Fonts"
		ECHO "Copied $TheName"
	}
	ELSE 
	{
		ECHO "Already existed: C:\Windows\Fonts\$TheName"
	}

	IF ( -Not (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts")."$TheBaseName ($TheExtension)")
	{
		New-ItemProperty -Force "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" -Name "$TheBaseName ($TheExtension)" -Value "$TheName" -Verbose
		ECHO "Added to registry: $TheBaseName ($TheExtension)"
	}
	ELSE
	{
		ECHO "Registry already exists: $TheBaseName ($TheExtension)"
	}
}
ELSE
{
	ECHO "Why: $TheName"
}

Remove-Item $TheDirAndPath

}
